<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>原型的引入</title>
</head>
<body>
<script>
    function Person(name, age, gender) {
        this.name = name;
        this.age = age;
        this.gender = gender;
        this.sayName = function () {
            console.log("我是" + this.name);
        }
    }

    //创建一个Person的实例
    var per = new Person("孙悟空", 18, "男");
    var per2 = new Person("猪八戒", 28, "男");
    per.sayName();
    per2.sayName();

    console.log(per.sayName == per2.sayName);
</script>
</body>
</html>